package com.magicmovie.api.service;

import com.magicmovie.api.service.impl.ViewHistoryServiceImpl;
import com.magicmovie.entity.ViewHistory;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(name = "service",fallback = ViewHistoryServiceImpl.class)
public interface ViewHistoryService {

    @RequestMapping(value = "/viewHistory/insert",method = RequestMethod.POST)
    void insert(@RequestBody ViewHistory viewHistory);

    @RequestMapping(value = "/viewHistory/findByCustomerId",method = RequestMethod.GET)
    Map<String, Object> findByCustomerId(@RequestParam("customerId") Integer customerId, @RequestParam("pageNum") Integer pageNum,@RequestParam("pageSize") Integer pageSize);
}
